import Layout from '@/views/layout/Layout'
/**
 * @author qun.xu
 * @desc   系统管理路由
 * @date   2018-11-20
 */
const systemRouter = {
  path: '/sys',
  component: Layout,
  name: 'Layout',
  meta: {
      title: '系统管理',
      icon: 'system-manage',
      perm:'sys'
  },
  children: [
    {
      path: 'admin',
      component: () => import('@/views/pages/admin/AdminList'),
      name: 'AdminList',
      meta: {
          title: '管理员列表',
          noCache:true,
          icon:'admin',
          perm:'sys:admin'
      }
    },
    {
      path: 'admin/editor',
      component: () => import('@/views/pages/admin/AdminEditor'),
      name: 'AdminEditor',
      hidden:true,
      meta: {
          noCache: true,
          title:'新增管理员',
          icon:'role',
          perm:'sys:admin'
      }
    },
    {
          path: 'admin/role',
          component: () => import('@/views/pages/admin/AdminRole'),
          name: 'AdminRole',
          hidden:true,
          meta: {
              noCache: true,
              title:'adminRole',
              perm:'sys:admin'
          }
    },
    {
        path: 'role',
        component: () => import('@/views/pages/sys/role/RoleList'),
        name: 'RoleList', //必须和组件中的name对应，要不然不缓存
        meta: {
            title:'角色列表',
            noCache:true,
            icon: 'role',
            perm: 'sys:role'
        }
    },
      {
          path: 'role/perm',
          component: () => import('@/views/pages/sys/role/RolePerm'),
          name: 'RolePerm', //必须和组件中的name对应，要不然不缓存
          hidden:true,
          meta: {
              title: '分配权限',
              noCache:true
          }
      },
      {
          path: 'role/editor',
          component: () => import('@/views/pages/admin/RoleEditor'),
          name: 'RoleEditor',
          hidden:true,
          meta: {
              noCache: true,
              title:'新增角色',
              perm:'sys:role'
          }
     },
      {
          path: 'banner',
          component: () => import('@/views/pages/admin/banner/BannerList'),
          name: 'BannerList', //必须和组件中的name对应，要不然不缓存
          meta: {
              title: '轮播图列表',
              noCache:true,
              icon:'banner',
              perm:'sys:banner'
          }
      },
      {
          path: 'perm',
          component: () => import('@/views/pages/sys/perm/Perm'),
          name: 'Perm', //必须和组件中的name对应，要不然不缓存
          meta: {
              title: '权限管理',
              noCache:true,
              icon:'perm',
              perm:'sys:perm'
          }
      }
]
}
export default systemRouter
